package org.kinglone.back.user.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.kinglone.back.user.model.User;
import org.kinglone.back.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserAction {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping("/list")
	public String list(Model model){
		
		List<User> users = userService.findUserList();
		model.addAttribute("users", users);
		return "user/list";		
	}
	
	/*@RequestMapping("/add")
	public String add(HttpServletRequest request){
		
		
	}*/
}
